<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>9.6. Constants for General Date Functions</title>
<link rel="stylesheet" href="dbstyle.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="Programmer's Reference Guide">
<link rel="up" href="zend.date.html" title="Chapter 9. Zend_Date">
<link rel="prev" href="zend.date.creation.html" title="9.5. Creation of dates">
<link rel="next" href="zend.date.additional.html" title="9.7. Working examples">
<link rel="chapter" href="introduction.html" title="Chapter 1. Introduction to Zend Framework">
<link rel="chapter" href="zend.acl.html" title="Chapter 2. Zend_Acl">
<link rel="chapter" href="zend.auth.html" title="Chapter 3. Zend_Auth">
<link rel="chapter" href="zend.cache.html" title="Chapter 4. Zend_Cache">
<link rel="chapter" href="zend.config.html" title="Chapter 5. Zend_Config">
<link rel="chapter" href="zend.console.getopt.html" title="Chapter 6. Zend_Console_Getopt">
<link rel="chapter" href="zend.controller.html" title="Chapter 7. Zend_Controller">
<link rel="chapter" href="zend.currency.html" title="Chapter 8. Zend_Currency">
<link rel="chapter" href="zend.date.html" title="Chapter 9. Zend_Date">
<link rel="chapter" href="zend.db.html" title="Chapter 10. Zend_Db">
<link rel="chapter" href="zend.debug.html" title="Chapter 11. Zend_Debug">
<link rel="chapter" href="zend.dojo.html" title="Chapter 12. Zend_Dojo">
<link rel="chapter" href="zend.dom.html" title="Chapter 13. Zend_Dom">
<link rel="chapter" href="zend.exception.html" title="Chapter 14. Zend_Exception">
<link rel="chapter" href="zend.feed.html" title="Chapter 15. Zend_Feed">
<link rel="chapter" href="zend.filter.html" title="Chapter 16. Zend_Filter">
<link rel="chapter" href="zend.form.html" title="Chapter 17. Zend_Form">
<link rel="chapter" href="zend.gdata.html" title="Chapter 18. Zend_Gdata">
<link rel="chapter" href="zend.http.html" title="Chapter 19. Zend_Http">
<link rel="chapter" href="zend.infocard.html" title="Chapter 20. Zend_InfoCard">
<link rel="chapter" href="zend.json.html" title="Chapter 21. Zend_Json">
<link rel="chapter" href="zend.layout.html" title="Chapter 22. Zend_Layout">
<link rel="chapter" href="zend.ldap.html" title="Chapter 23. Zend_Ldap">
<link rel="chapter" href="zend.loader.html" title="Chapter 24. Zend_Loader">
<link rel="chapter" href="zend.locale.html" title="Chapter 25. Zend_Locale">
<link rel="chapter" href="zend.log.html" title="Chapter 26. Zend_Log">
<link rel="chapter" href="zend.mail.html" title="Chapter 27. Zend_Mail">
<link rel="chapter" href="zend.measure.html" title="Chapter 28. Zend_Measure">
<link rel="chapter" href="zend.memory.html" title="Chapter 29. Zend_Memory">
<link rel="chapter" href="zend.mime.html" title="Chapter 30. Zend_Mime">
<link rel="chapter" href="zend.openid.html" title="Chapter 31. Zend_OpenId">
<link rel="chapter" href="zend.paginator.html" title="Chapter 32. Zend_Paginator">
<link rel="chapter" href="zend.pdf.html" title="Chapter 33. Zend_Pdf">
<link rel="chapter" href="zend.registry.html" title="Chapter 34. Zend_Registry">
<link rel="chapter" href="zend.rest.html" title="Chapter 35. Zend_Rest">
<link rel="chapter" href="zend.search.lucene.html" title="Chapter 36. Zend_Search_Lucene">
<link rel="chapter" href="zend.server.html" title="Chapter 37. Zend_Server">
<link rel="chapter" href="zend.service.html" title="Chapter 38. Zend_Service">
<link rel="chapter" href="zend.session.html" title="Chapter 39. Zend_Session">
<link rel="chapter" href="zend.soap.html" title="Chapter 40. Zend_Soap">
<link rel="chapter" href="zend.test.html" title="Chapter 41. Zend_Test">
<link rel="chapter" href="zend.text.html" title="Chapter 42. Zend_Text">
<link rel="chapter" href="zend.timesync.html" title="Chapter 43. Zend_TimeSync">
<link rel="chapter" href="zend.translate.html" title="Chapter 44. Zend_Translate">
<link rel="chapter" href="zend.uri.html" title="Chapter 45. Zend_Uri">
<link rel="chapter" href="zend.validate.html" title="Chapter 46. Zend_Validate">
<link rel="chapter" href="zend.version.html" title="Chapter 47. Zend_Version">
<link rel="chapter" href="zend.view.html" title="Chapter 48. Zend_View">
<link rel="chapter" href="zend.xmlrpc.html" title="Chapter 49. Zend_XmlRpc">
<link rel="appendix" href="requirements.html" title="Appendix A. Zend Framework Requirements">
<link rel="appendix" href="coding-standard.html" title="Appendix B. Zend Framework Coding Standard for PHP">
<link rel="appendix" href="copyrights.html" title="Appendix C. Copyright Information">
<link rel="index" href="the.index.html" title="Index">
<link rel="subsection" href="zend.date.constants.html#zend.date.constants.using" title="9.6.1. Using Constants">
<link rel="subsection" href="zend.date.constants.html#zend.date.constants.list" title="9.6.2. List of All Constants">
<link rel="subsection" href="zend.date.constants.html#zend.date.constants.selfdefinedformats" title="9.6.3. Self-Defined OUTPUT Formats with ISO">
<link rel="subsection" href="zend.date.constants.html#zend.date.constants.phpformats" title="9.6.4. Self-defined OUTPUT formats using PHP's date() format specifiers">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader"><table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">9.6. Constants for General Date Functions</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="zend.date.creation.html">Prev</a> </td>
<th width="60%" align="center">Chapter 9. Zend_Date</th>
<td width="20%" align="right"> <a accesskey="n" href="zend.date.additional.html">Next</a>
</td>
</tr>
</table></div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="zend.date.constants"></a>9.6. Constants for General Date Functions</h2></div></div></div>
<p>
        Whenever a <code class="code">Zend_Date</code> method has a <code class="code">$parts</code> parameter, one of the constants below can be
        used as the argument for that parameter, in order to select a specific part of a date or indicate the date
        format used or desired (e.g. RFC 822).
    </p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.date.constants.using"></a>9.6.1. Using Constants</h3></div></div></div>
<p>
            For example, the constant <code class="code">Zend_Date::HOUR</code> can be used in the ways shown below. When working
            with days of the week, calendar dates, hours, minutes, seconds, and any other date parts that are expressed
            differently when in different parts of the world, the object's timezone will automatically be used to
            compute the correct value, even though the internal timestamp is the same for the same moment in time,
            regardless of the user's physical location in the world. Regardless of the units involved, output must be
            expressed either as GMT/UTC or localized to a locale. The example output below reflects localization to
            Europe/GMT+1 hour (e.g. Germany, Austria, France).
        </p>
<div class="table">
<a name="zend.date.constants.using.table"></a><p class="title"><b>Table 9.7. Operations involving Zend_Date::HOUR</b></p>
<div class="table-contents"><table summary="Operations involving Zend_Date::HOUR" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Function/input</th>
<th>Description</th>
<th>Original date</th>
<th>Effect/output</th>
</tr></thead>
<tbody>
<tr>
<td>get(Zend_Date::HOUR)</td>
<td>Output of the hour</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>14</td>
</tr>
<tr>
<td>set(12, Zend_Date::HOUR)</td>
<td>Set new hour</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>2009-02-13T12:53:27+01:00</td>
</tr>
<tr>
<td>add(12, Zend_Date::HOUR)</td>
<td>Add hours</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>2009-02-14T02:53:27+01:00</td>
</tr>
<tr>
<td>sub(12, Zend_Date::HOUR)</td>
<td>Subtract hours</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>2009-02-13T02:53:27+01:00</td>
</tr>
<tr>
<td>compare(12, Zend_Date::HOUR)</td>
<td>Compare hour, returns 0, 1 or -1</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>1 (if object &gt; argument)</td>
</tr>
<tr>
<td>copy(Zend_Date::HOUR)</td>
<td>Copies only the hour part</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>1970-01-01T14:00:00+01:00</td>
</tr>
<tr>
<td>equals(14, Zend_Date::HOUR)</td>
<td>Compares the hour, returns TRUE or FALSE</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>TRUE</td>
</tr>
<tr>
<td>isEarlier(12, Zend_Date::HOUR)</td>
<td>Compares the hour, returns TRUE or FALSE</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>TRUE</td>
</tr>
<tr>
<td>isLater(12, Zend_Date::HOUR)</td>
<td>Compares the hour, returns TRUE or FALSE</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>FALSE</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.date.constants.list"></a>9.6.2. List of All Constants</h3></div></div></div>
<p>
            Each part of a date/time has a unique constant in <code class="code">Zend_Date</code>. All constants supported by
            <code class="code">Zend_Date</code> are listed below.
        </p>
<div class="table">
<a name="zend.date.constants.list.table-1"></a><p class="title"><b>Table 9.8. Day Constants</b></p>
<div class="table-contents"><table summary="Day Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::DAY</td>
<td>Day (as a number, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-02-<span class="strong"><strong>06</strong></span>T14:53:27+01:00 (06)</td>
</tr>
<tr>
<td>Zend_Date::DAY_SHORT</td>
<td>Day (as a number, one or two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-02-0<span class="strong"><strong>6</strong></span>T14:53:27+01:00 (6)</td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY</td>
<td>Weekday (Name of the day, localized, complete)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Friday</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY_SHORT</td>
<td>Weekday (Name of the day, localized, abbreviated, the first three digits)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fre</strong></span> for Friday</td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY_NAME</td>
<td>Weekday (Name of the day, localized, abbreviated, the first two digits)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fr</strong></span> for Friday</td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY_NARROW</td>
<td>Weekday (Name of the day, localized, abbreviated, only the first digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>F</strong></span> for Friday</td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY_DIGIT</td>
<td>Weekday (0 = Sunday, 6 = Saturday)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>5</strong></span> for Friday</td>
</tr>
<tr>
<td>Zend_Date::WEEKDAY_8601</td>
<td>Weekday according to ISO 8601 (1 = Monday, 7 = Sunday)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>5</strong></span> for Friday</td>
</tr>
<tr>
<td>Zend_Date::DAY_OF_YEAR</td>
<td>Day (as a number, one or two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>43</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DAY_SUFFIX</td>
<td>English addendum for the day (st, nd, rd, th)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>th</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-2"></a><p class="title"><b>Table 9.9. Week Constants</b></p>
<div class="table-contents"><table summary="Week Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody><tr>
<td>Zend_Date::WEEK</td>
<td>Week (as a number, 1-53)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>7</strong></span>
                        </td>
</tr></tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-3"></a><p class="title"><b>Table 9.10. Month Constants</b></p>
<div class="table-contents"><table summary="Month Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::MONTH_NAME</td>
<td>Month (Name of the month, localized, complete)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>February</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::MONTH_NAME_SHORT</td>
<td>Month (Name of the month, localized, abbreviated, three digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Feb</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::MONTH_NAME_NARROW</td>
<td>Month (Name of the month, localized, abbreviated, one digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>F</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::MONTH</td>
<td>Month (Number of the month, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-<span class="strong"><strong>02</strong></span>-06T14:53:27+01:00 (02)</td>
</tr>
<tr>
<td>Zend_Date::MONTH_SHORT</td>
<td>Month (Number of the month, one or two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-0<span class="strong"><strong>2</strong></span>-06T14:53:27+01:00 (2)</td>
</tr>
<tr>
<td>Zend_Date::MONTH_DAYS</td>
<td>Number of days for this month (number)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>28</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-4"></a><p class="title"><b>Table 9.11. Year Constants</b></p>
<div class="table-contents"><table summary="Year Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::YEAR</td>
<td>Year (number)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2009</strong></span>-02-06T14:53:27+01:00</td>
</tr>
<tr>
<td>Zend_Date::YEAR_8601</td>
<td>Year according to ISO 8601 (number)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::YEAR_SHORT</td>
<td>Year (number, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>20<span class="strong"><strong>09</strong></span>-02-06T14:53:27+01:00</td>
</tr>
<tr>
<td>Zend_Date::YEAR_SHORT_8601</td>
<td>Year according to ISO 8601 (number, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::LEAPYEAR</td>
<td>Is the year a leap year? (TRUE or FALSE)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>FALSE</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-5"></a><p class="title"><b>Table 9.12. Time Constants</b></p>
<div class="table-contents"><table summary="Time Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::HOUR</td>
<td>Hour (00-23, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::HOUR_SHORT</td>
<td>Hour (0-23, one or two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::HOUR_SHORT_AM</td>
<td>Hour (1-12, one or two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::HOUR_AM</td>
<td>Hour (01-12, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::MINUTE</td>
<td>Minute (00-59, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-02-06T14:<span class="strong"><strong>53</strong></span>:27+01:00</td>
</tr>
<tr>
<td>Zend_Date::MINUTE_SHORT</td>
<td>Minute (0-59, one or two digit)</td>
<td>2009-02-06T14:03:27+01:00</td>
<td>2009-02-06T14:0<span class="strong"><strong>3</strong></span>:27+01:00</td>
</tr>
<tr>
<td>Zend_Date::SECOND</td>
<td>Second (00-59, two digit)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>2009-02-06T14:53:<span class="strong"><strong>27</strong></span>+01:00</td>
</tr>
<tr>
<td>Zend_Date::SECOND_SHORT</td>
<td>Second (0-59, one or two digit)</td>
<td>2009-02-06T14:53:07+01:00</td>
<td>2009-02-06T14:53:0<span class="strong"><strong>7</strong></span>+01:00</td>
</tr>
<tr>
<td>Zend_Date::MILLISECOND</td>
<td>Millisecond (theoretically infinite)</td>
<td>2009-02-06T14:53:27.20546</td>
<td>2009-02-06T14:53:27.<span class="strong"><strong>20546</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::MERIDIEM</td>
<td>Time of day (forenoon/afternoon)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>afternoon</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::SWATCH</td>
<td>Swatch Internet Time</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>620</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-6"></a><p class="title"><b>Table 9.13. Timezone Constants</b></p>
<div class="table-contents"><table summary="Timezone Constants" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::TIMEZONE</td>
<td>Name der time zone (string, abbreviated)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>CET</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIMEZONE_NAME</td>
<td>Name of the time zone (string, complete)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Europe/Paris</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIMEZONE_SECS</td>
<td>Difference of the time zone to GMT in seconds (integer)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>3600</strong></span> seconds to GMT</td>
</tr>
<tr>
<td>Zend_Date::GMT_DIFF</td>
<td>Difference to GMT in seconds (string)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>+0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::GMT_DIFF_SEP</td>
<td>Difference to GMT in seconds (string, separated)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>+01:00</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DAYLIGHT</td>
<td>Summer time or Winter time? (TRUE or FALSE)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>FALSE</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="zend.date.constants.list.table-7"></a><p class="title"><b>Table 9.14. Date Format Constants (formats include timezone)</b></p>
<div class="table-contents"><table summary="Date Format Constants (formats include timezone)" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::ISO_8601</td>
<td>Date according to ISO 8601 (string, complete)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2009-02-13T14:53:27+01:00</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RFC_2822</td>
<td>Date according to RFC 2822 (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fri, 13 Feb 2009 14:53:27 +0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIMESTAMP</td>
<td>
                            <a href="http://en.wikipedia.org/wiki/Unix_Time" target="_top">Unix time</a> (seconds since 1.1.1970, mixed)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>1234533207</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::ATOM</td>
<td>Date according to ATOM (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2009-02-13T14:53:27+01:00</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::COOKIE</td>
<td>Date for Cookies (string, for Cookies)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Friday, 13-Feb-09 14:53:27 Europe/Paris</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RFC_822</td>
<td>Date according to RFC 822 (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fri, 13 Feb 09 14:53:27 +0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RFC_850</td>
<td>Date according to RFC 850 (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Friday, 13-Feb-09 14:53:27 Europe/Paris</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RFC_1036</td>
<td>Date according to RFC 1036 (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fri, 13 Feb 09 14:53:27 +0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RFC_1123</td>
<td>Date according to RFC 1123 (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fri, 13 Feb 2009 14:53:27 +0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::RSS</td>
<td>Date for RSS Feeds (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Fri, 13 Feb 2009 14:53:27 +0100</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::W3C</td>
<td>Date for HTML/HTTP according to W3C (string)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>2009-02-13T14:53:27+01:00</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
            Especially note <code class="code">Zend_Date::DATES</code>, since this format specifier has a unique property within
            <code class="code">Zend_Date</code> as an <span class="strong"><strong>input</strong></span> format specifier. When used as an
            input format for <code class="code">$part</code>, this constant provides the most flexible acceptance of a variety of
            similar date formats. Heuristics are used to automatically extract dates from an input string and then "fix"
            simple errors in dates (if any), such as swapping of years, months, and days, when possible.
        </p>
<div class="table">
<a name="zend.date.constants.list.table-8"></a><p class="title"><b>Table 9.15. Date and Time Formats (format varies by locale)</b></p>
<div class="table-contents"><table summary="Date and Time Formats (format varies by locale)" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Date</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>Zend_Date::ERA</td>
<td>Epoch (string, localized, abbreviated)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>AD</strong></span> (anno Domini)</td>
</tr>
<tr>
<td>Zend_Date::ERA_NAME</td>
<td>Epoch (string, localized, complete)</td>
<td>2009-02-06T14:53:27+01:00</td>
<td>
<span class="strong"><strong>anno domini</strong></span> (anno Domini)</td>
</tr>
<tr>
<td>
<span class="strong"><strong>Zend_Date::DATES</strong></span>
                        </td>
<td>Standard date (string, localized, default value).</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>13.02.2009</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DATE_FULL</td>
<td>Complete date (string, localized, complete)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>Friday, 13. February 2009</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DATE_LONG</td>
<td>Long date (string, localized, long)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>13. February 2009</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DATE_MEDIUM</td>
<td>Normal date (string, localized, normal)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>13.02.2009</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::DATE_SHORT</td>
<td>Abbreviated Date (string, localized, abbreviated)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>13.02.09</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIMES</td>
<td>Standard time (string, localized, default value)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14:53:27</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIME_FULL</td>
<td>Complete time (string, localized, complete)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14:53 Uhr CET</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIME_LONG</td>
<td>Long time (string, localized, Long)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14:53:27 CET</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIME_MEDIUM</td>
<td>Normal time (string, localized, normal)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14:53:27</strong></span>
                        </td>
</tr>
<tr>
<td>Zend_Date::TIME_SHORT</td>
<td>Abbreviated time (string, localized, abbreviated)</td>
<td>2009-02-13T14:53:27+01:00</td>
<td>
<span class="strong"><strong>14:53</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.date.constants.selfdefinedformats"></a>9.6.3. Self-Defined OUTPUT Formats with ISO</h3></div></div></div>
<p>
            If you need a date format not shown above, then use a self-defined format composed from the ISO format token
            specifiers below. The following examples illustrate the usage of constants from the table below to create
            self-defined ISO formats. The format length is unlimited. Also, multiple usage of format constants is
            allowed.
        </p>
<p>
            The accepted format specifiers can be changed from ISO Format to PHP's date format if you are more
            comfortable with it. However, not all formats defined in the ISO norm are supported with PHP's date format
            specifiers. Use the <code class="code">Zend_Date::setOptions(array('format_type' =&gt; 'php'))</code> method to switch
            Zend_Date methods from supporting ISO format specifiers to PHP date() type specifiers (see
            <a href="zend.date.constants.html#zend.date.constants.phpformats" title="9.6.4. Self-defined OUTPUT formats using PHP's date() format specifiers">Section 9.6.4, “Self-defined OUTPUT formats using PHP's date() format specifiers”</a>
            below).
        </p>
<div class="example">
<a name="zend.date.constants.selfdefinedformats.example-1"></a><p class="title"><b>Example 9.15. Example usage for self-defined ISO formats</b></p>
<div class="example-contents"><pre class="programlisting">&lt;?php
require_once 'Zend/Date.php';

$locale = new Zend_Locale('de_AT');
$date = new Zend_Date(1234567890, false, $locale);
print $date-&gt;toString("'Era:GGGG='GGGG, ' Date:yy.MMMM.dd'yy.MMMM.dd");
            </pre></div>
</div>
<br class="example-break"><div class="table">
<a name="zend.date.constants.selfdefinedformats.table"></a><p class="title"><b>Table 9.16. Constants for <span class="strong">ISO 8601 date output</span>
            </b></p>
<div class="table-contents"><table summary="Constants for ISO 8601 date output
            " border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Corresponds best to</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>G</td>
<td>Epoch, localized, abbreviated</td>
<td>Zend_Date::ERA</td>
<td>
<span class="strong"><strong>AD</strong></span>
                        </td>
</tr>
<tr>
<td>GG</td>
<td>Epoch, localized, abbreviated</td>
<td>Zend_Date::ERA</td>
<td>
<span class="strong"><strong>AD</strong></span>
                        </td>
</tr>
<tr>
<td>GGG</td>
<td>Epoch, localized, abbreviated</td>
<td>Zend_Date::ERA</td>
<td>
<span class="strong"><strong>AD</strong></span>
                        </td>
</tr>
<tr>
<td>GGGG</td>
<td>Epoch, localized, complete</td>
<td>Zend_Date::ERA_NAME</td>
<td>
<span class="strong"><strong>anno domini</strong></span>
                        </td>
</tr>
<tr>
<td>GGGGG</td>
<td>Epoch, localized, abbreviated</td>
<td>Zend_Date::ERA</td>
<td>
<span class="strong"><strong>a</strong></span>
                        </td>
</tr>
<tr>
<td>y</td>
<td>Year, at least one digit</td>
<td>Zend_Date::YEAR</td>
<td>
<span class="strong"><strong>9</strong></span>
                        </td>
</tr>
<tr>
<td>yy</td>
<td>Year, at least two digit</td>
<td>Zend_Date::YEAR_SHORT</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>yyy</td>
<td>Year, at least three digit</td>
<td>Zend_Date::YEAR</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>yyyy</td>
<td>Year, at least four digit</td>
<td>Zend_Date::YEAR</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>yyyyy</td>
<td>Year, at least five digit</td>
<td>Zend_Date::YEAR</td>
<td>
<span class="strong"><strong>02009</strong></span>
                        </td>
</tr>
<tr>
<td>Y</td>
<td>Year according to ISO 8601, at least one digit</td>
<td>Zend_Date::YEAR_8601</td>
<td>
<span class="strong"><strong>9</strong></span>
                        </td>
</tr>
<tr>
<td>YY</td>
<td>Year according to ISO 8601, at least two digit</td>
<td>Zend_Date::YEAR_SHORT_8601</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>YYY</td>
<td>Year according to ISO 8601, at least three digit</td>
<td>Zend_Date::YEAR_8601</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>YYYY</td>
<td>Year according to ISO 8601, at least four digit</td>
<td>Zend_Date::YEAR_8601</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>YYYYY</td>
<td>Year according to ISO 8601, at least five digit</td>
<td>Zend_Date::YEAR_8601</td>
<td>
<span class="strong"><strong>02009</strong></span>
                        </td>
</tr>
<tr>
<td>M</td>
<td>Month, one or two digit</td>
<td>Zend_Date::MONTH_SHORT</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>MM</td>
<td>Month, two digit</td>
<td>Zend_Date::MONTH</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>MMM</td>
<td>Month, localized, abbreviated</td>
<td>Zend_Date::MONTH_NAME_SHORT</td>
<td>
<span class="strong"><strong>Feb</strong></span>
                        </td>
</tr>
<tr>
<td>MMMM</td>
<td>Month, localized, complete</td>
<td>Zend_Date::MONTH_NAME</td>
<td>
<span class="strong"><strong>February</strong></span>
                        </td>
</tr>
<tr>
<td>MMMMM</td>
<td>Month, localized, abbreviated, one digit</td>
<td>Zend_Date::MONTH_NAME_NARROW</td>
<td>
<span class="strong"><strong>F</strong></span>
                        </td>
</tr>
<tr>
<td>w</td>
<td>Week, one or two digit</td>
<td>Zend_Date::WEEK</td>
<td>
<span class="strong"><strong>5</strong></span>
                        </td>
</tr>
<tr>
<td>ww</td>
<td>Week, two digit</td>
<td>Zend_Date::WEEK</td>
<td>
<span class="strong"><strong>05</strong></span>
                        </td>
</tr>
<tr>
<td>d</td>
<td>Day of the month, one or two digit</td>
<td>Zend_Date::DAY_SHORT</td>
<td>
<span class="strong"><strong>9</strong></span>
                        </td>
</tr>
<tr>
<td>dd</td>
<td>Day of the month, two digit</td>
<td>Zend_Date::DAY</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>D</td>
<td>Day of the year, one, two or three digit</td>
<td>Zend_Date::DAY_OF_YEAR</td>
<td>
<span class="strong"><strong>7</strong></span>
                        </td>
</tr>
<tr>
<td>DD</td>
<td>Day of the year, two or three digit</td>
<td>Zend_Date::DAY_OF_YEAR</td>
<td>
<span class="strong"><strong>07</strong></span>
                        </td>
</tr>
<tr>
<td>DDD</td>
<td>Day of the year, three digit</td>
<td>Zend_Date::DAY_OF_YEAR</td>
<td>
<span class="strong"><strong>007</strong></span>
                        </td>
</tr>
<tr>
<td>E</td>
<td>Day of the week, localized, abbreviated, one char</td>
<td>Zend_Date::WEEKDAY_NARROW</td>
<td>
<span class="strong"><strong>M</strong></span>
                        </td>
</tr>
<tr>
<td>EE</td>
<td>Day of the week, localized, abbreviated, two char</td>
<td>Zend_Date::WEEKDAY_NAME</td>
<td>
<span class="strong"><strong>Mo</strong></span>
                        </td>
</tr>
<tr>
<td>EEE</td>
<td>Day of the week, localized, abbreviated, three char</td>
<td>Zend_Date::WEEKDAY_SHORT</td>
<td>
<span class="strong"><strong>Mon</strong></span>
                        </td>
</tr>
<tr>
<td>EEEE</td>
<td>Day of the week, localized, complete</td>
<td>Zend_Date::WEEKDAY</td>
<td>
<span class="strong"><strong>Monday</strong></span>
                        </td>
</tr>
<tr>
<td>EEEEE</td>
<td>Day of the week, localized, abbreviated, one digit</td>
<td>Zend_Date::WEEKDAY_NARROW</td>
<td>
<span class="strong"><strong>M</strong></span>
                        </td>
</tr>
<tr>
<td>e</td>
<td>Number of the day, one digit</td>
<td>Zend_Date::WEEKDAY_NARROW</td>
<td>
<span class="strong"><strong>4</strong></span>
                        </td>
</tr>
<tr>
<td>ee</td>
<td>Number of the day, two digit</td>
<td>Zend_Date::WEEKDAY_NARROW</td>
<td>
<span class="strong"><strong>04</strong></span>
                        </td>
</tr>
<tr>
<td>a</td>
<td>Time of day, localized</td>
<td>Zend_Date::MERIDIEM</td>
<td>
<span class="strong"><strong>vorm.</strong></span>
                        </td>
</tr>
<tr>
<td>h</td>
<td>Hour, (1-12), one or two digit</td>
<td>Zend_Date::HOUR_SHORT_AM</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>hh</td>
<td>Hour, (01-12), two digit</td>
<td>Zend_Date::HOUR_AM</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>H</td>
<td>Hour, (0-23), one or two digit</td>
<td>Zend_Date::HOUR_SHORT</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>HH</td>
<td>Hour, (00-23), two digit</td>
<td>Zend_Date::HOUR</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>m</td>
<td>Minute, (0-59), one or two digit</td>
<td>Zend_Date::MINUTE_SHORT</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>mm</td>
<td>Minute, (00-59), two digit</td>
<td>Zend_Date::MINUTE</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>s</td>
<td>Second, (0-59), one or two digit</td>
<td>Zend_Date::SECOND_SHORT</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>ss</td>
<td>Second, (00-59), two digit</td>
<td>Zend_Date::SECOND</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>S</td>
<td>Millisecond</td>
<td>Zend_Date::MILLISECOND</td>
<td>
<span class="strong"><strong>20536</strong></span>
                        </td>
</tr>
<tr>
<td>z</td>
<td>Time zone, localized, abbreviated</td>
<td>Zend_Date::TIMEZONE</td>
<td>
<span class="strong"><strong>CET</strong></span>
                        </td>
</tr>
<tr>
<td>zz</td>
<td>Time zone, localized, abbreviated</td>
<td>Zend_Date::TIMEZONE</td>
<td>
<span class="strong"><strong>CET</strong></span>
                        </td>
</tr>
<tr>
<td>zzz</td>
<td>Time zone, localized, abbreviated</td>
<td>Zend_Date::TIMEZONE</td>
<td>
<span class="strong"><strong>CET</strong></span>
                        </td>
</tr>
<tr>
<td>zzzz</td>
<td>Time zone, localized, complete</td>
<td>Zend_Date::TIMEZONE_NAME</td>
<td>
<span class="strong"><strong>Europe/Paris</strong></span>
                        </td>
</tr>
<tr>
<td>Z</td>
<td>Difference of time zone</td>
<td>Zend_Date::GMT_DIFF</td>
<td>
<span class="strong"><strong>+0100</strong></span>
                        </td>
</tr>
<tr>
<td>ZZ</td>
<td>Difference of time zone</td>
<td>Zend_Date::GMT_DIFF</td>
<td>
<span class="strong"><strong>+0100</strong></span>
                        </td>
</tr>
<tr>
<td>ZZZ</td>
<td>Difference of time zone</td>
<td>Zend_Date::GMT_DIFF</td>
<td>
<span class="strong"><strong>+0100</strong></span>
                        </td>
</tr>
<tr>
<td>ZZZZ</td>
<td>Difference of time zone, separated</td>
<td>Zend_Date::GMT_DIFF_SEP</td>
<td>
<span class="strong"><strong>+01:00</strong></span>
                        </td>
</tr>
<tr>
<td>A</td>
<td>Millisecond</td>
<td>Zend_Date::MILLISECOND</td>
<td>
<span class="strong"><strong>20563</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
                Note that the default ISO format differs from PHP's format which can be
                irritating if you have not used in previous. Especially the format specifiers
                for <span class="strong"><strong>Year and Minute</strong></span> are often not used in the
                intended way.
            </p>
<p>
                For <span class="strong"><strong>year</strong></span> there are two specifiers available
                which are often mistaken. The <span class="strong"><strong>Y</strong></span> specifier
                for the ISO year and the <span class="strong"><strong>y</strong></span> specifier for the
                real year. The difference is small but significant.
                <span class="strong"><strong>Y</strong></span> calculates the ISO year, which is often used
                for calendar formats. See for example the 31. December 2007. The real year is
                2007, but it is the first day of the first week in the week 1 of the year 2008.
                So, if you are using 'dd.MM.yyyy' you will get '31.December.2007' but if you use
                'dd.MM.YYYY' you will get '31.December.2008'. As you see this is no bug but a
                expected behaviour depending on the used specifiers.
            </p>
<p>
                For <span class="strong"><strong>minute</strong></span> the difference is not so big. ISO
                uses the specifier <span class="strong"><strong>m</strong></span> for the minute, unlike
                PHP which uses <span class="strong"><strong>i</strong></span>. So if you are getting no
                minute in your format check if you have used the right specifier.
            </p>
</td></tr>
</table></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="zend.date.constants.phpformats"></a>9.6.4. Self-defined OUTPUT formats using PHP's date() format specifiers</h3></div></div></div>
<p>
            If you are more comfortable with PHP's date format specifier than with ISO format specifiers, then you can
            use the <code class="code">Zend_Date::setOptions(array('format' =&gt; 'php'))</code> method to switch Zend_Date methods from
            supporting ISO format specifiers to PHP date() type specifiers. Afterwards, all format parameters must be
            given with
            <a href="http://php.net/date" target="_top">PHP's <code class="code">date()</code> format specifiers</a>
            . The PHP date format lacks some of the formats supported by the ISO Format, and vice-versa. If you are not
            already comfortable with it, then use the standard ISO format instead. Also, if you have legacy code using
            PHP's date format, then either manually convert it to the ISO format using
            <a href="zend.locale.date.datesandtimes.html#zend.locale.date.normalize" title="25.4.1. Normalizing Dates and Times">Zend_Locale_Format::convertPhpToIsoFormat()</a>
            , or use <code class="code">setOptions()</code>. The following examples illustrate the usage of constants from the table
            below to create self-defined formats.
        </p>
<div class="example">
<a name="zend.date.constants.phpformats.example-1"></a><p class="title"><b>Example 9.16. Example usage for self-defined formats with PHP specifier</b></p>
<div class="example-contents"><pre class="programlisting">&lt;?php
require_once 'Zend/Date.php';

$locale = new Zend_Locale('de_AT');
Zend_Date::setOptions(array('format_type' =&gt; 'php'));
$date = new Zend_Date(1234567890, false, $locale);

// outputs something like 'February 16, 2007, 3:36 am'
print $date-&gt;toString('F j, Y, g:i a');

print $date-&gt;toString("'Format:D M j G:i:s T Y='D M j G:i:s T Y");
            </pre></div>
</div>
<br class="example-break"><p>
            The following table shows the list of PHP date format specifiers with their equivalent Zend_Date constants
            and CLDR/ISO equivalent format specifiers. In most cases, when the CLDR/ISO format does not have an
            equivalent format specifier, the PHP format specifier is not altered by
            <code class="code">Zend_Locale_Format::convertPhpToIsoFormat()</code>, and the Zend_Date methods then recognize these
            "peculiar" PHP format specifiers, even when in the default "ISO" format mode.
        </p>
<div class="table">
<a name="zend.date.constants.phpformats.table"></a><p class="title"><b>Table 9.17. Constants for <span class="strong">PHP date output</span>
            </b></p>
<div class="table-contents"><table summary="Constants for PHP date output
            " border="1">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Constant</th>
<th>Description</th>
<th>Corresponds best to</th>
<th>closest CLDR equivalent</th>
<th>Affected part/example</th>
</tr></thead>
<tbody>
<tr>
<td>d</td>
<td>Day of the month, two digit</td>
<td>Zend_Date::DAY</td>
<td>dd</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>D</td>
<td>Day of the week, localized, abbreviated, three digit</td>
<td>Zend_Date::WEEKDAY_SHORT</td>
<td>EEE</td>
<td>
<span class="strong"><strong>Mon</strong></span>
                        </td>
</tr>
<tr>
<td>j</td>
<td>Day of the month, one or two digit</td>
<td>Zend_Date::DAY_SHORT</td>
<td>d</td>
<td>
<span class="strong"><strong>9</strong></span>
                        </td>
</tr>
<tr>
<td>l (lowercase L)</td>
<td>Day of the week, localized, complete</td>
<td>Zend_Date::WEEKDAY</td>
<td>EEEE</td>
<td>
<span class="strong"><strong>Monday</strong></span>
                        </td>
</tr>
<tr>
<td>N</td>
<td>Number of the weekday, one digit</td>
<td>Zend_Date::WEEKDAY_8601</td>
<td>e</td>
<td>
<span class="strong"><strong>4</strong></span>
                        </td>
</tr>
<tr>
<td>S</td>
<td>English suffixes for day of month, two chars</td>
<td>no equivalent</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>st</strong></span>
                        </td>
</tr>
<tr>
<td>w</td>
<td>Number of the weekday, 0=sunday, 6=saturday</td>
<td>Zend_Date::WEEKDAY_DIGIT</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>4</strong></span>
                        </td>
</tr>
<tr>
<td>z</td>
<td>Day of the year, one, two or three digit</td>
<td>Zend_Date::DAY_OF_YEAR</td>
<td>D</td>
<td>
<span class="strong"><strong>7</strong></span>
                        </td>
</tr>
<tr>
<td>W</td>
<td>Week, one or two digit</td>
<td>Zend_Date::WEEK</td>
<td>w</td>
<td>
<span class="strong"><strong>5</strong></span>
                        </td>
</tr>
<tr>
<td>F</td>
<td>Month, localized, complete</td>
<td>Zend_Date::MONTH_NAME</td>
<td>MMMM</td>
<td>
<span class="strong"><strong>February</strong></span>
                        </td>
</tr>
<tr>
<td>m</td>
<td>Month, two digit</td>
<td>Zend_Date::MONTH</td>
<td>MM</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>M</td>
<td>Month, localized, abbreviated</td>
<td>Zend_Date::MONTH_NAME_SHORT</td>
<td>MMM</td>
<td>
<span class="strong"><strong>Feb</strong></span>
                        </td>
</tr>
<tr>
<td>n</td>
<td>Month, one or two digit</td>
<td>Zend_Date::MONTH_SHORT</td>
<td>M</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>t</td>
<td>Number of days per month, one or two digits</td>
<td>Zend_Date::MONTH_DAYS</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>30</strong></span>
                        </td>
</tr>
<tr>
<td>L</td>
<td>Leapyear, boolean</td>
<td>Zend_Date::LEAPYEAR</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>true</strong></span>
                        </td>
</tr>
<tr>
<td>o</td>
<td>Year according to ISO 8601, at least four digit</td>
<td>Zend_Date::YEAR_8601</td>
<td>YYYY</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>Y</td>
<td>Year, at least four digit</td>
<td>Zend_Date::YEAR</td>
<td>yyyy</td>
<td>
<span class="strong"><strong>2009</strong></span>
                        </td>
</tr>
<tr>
<td>y</td>
<td>Year, at least two digit</td>
<td>Zend_Date::YEAR_SHORT</td>
<td>yy</td>
<td>
<span class="strong"><strong>09</strong></span>
                        </td>
</tr>
<tr>
<td>a</td>
<td>Time of day, localized</td>
<td>Zend_Date::MERIDIEM</td>
<td>a (sort of, but likely to be uppercase)</td>
<td>
<span class="strong"><strong>vorm.</strong></span>
                        </td>
</tr>
<tr>
<td>A</td>
<td>Time of day, localized</td>
<td>Zend_Date::MERIDIEM</td>
<td>a (sort of, but no guarantee that the format is uppercase)</td>
<td>
<span class="strong"><strong>VORM.</strong></span>
                        </td>
</tr>
<tr>
<td>B</td>
<td>Swatch internet time</td>
<td>Zend_Date::SWATCH</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>1463</strong></span>
                        </td>
</tr>
<tr>
<td>g</td>
<td>Hour, (1-12), one or two digit</td>
<td>Zend_Date::HOUR_SHORT_AM</td>
<td>h</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>G</td>
<td>Hour, (0-23), one or two digit</td>
<td>Zend_Date::HOUR_SHORT</td>
<td>H</td>
<td>
<span class="strong"><strong>2</strong></span>
                        </td>
</tr>
<tr>
<td>h</td>
<td>Hour, (01-12), two digit</td>
<td>Zend_Date::HOUR_AM</td>
<td>hh</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>H</td>
<td>Hour, (00-23), two digit</td>
<td>Zend_Date::HOUR</td>
<td>HH</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>i</td>
<td>Minute, (00-59), two digit</td>
<td>Zend_Date::MINUTE</td>
<td>mm</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>s</td>
<td>Second, (00-59), two digit</td>
<td>Zend_Date::SECOND</td>
<td>ss</td>
<td>
<span class="strong"><strong>02</strong></span>
                        </td>
</tr>
<tr>
<td>e</td>
<td>Time zone, localized, complete</td>
<td>Zend_Date::TIMEZONE_NAME</td>
<td>zzzz</td>
<td>
<span class="strong"><strong>Europe/Paris</strong></span>
                        </td>
</tr>
<tr>
<td>I</td>
<td>Daylight</td>
<td>Zend_Date::DAYLIGHT</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>1</strong></span>
                        </td>
</tr>
<tr>
<td>O</td>
<td>Difference of time zone</td>
<td>Zend_Date::GMT_DIFF</td>
<td>Z or ZZ or ZZZ</td>
<td>
<span class="strong"><strong>+0100</strong></span>
                        </td>
</tr>
<tr>
<td>P</td>
<td>Difference of time zone, separated</td>
<td>Zend_Date::GMT_DIFF_SEP</td>
<td>ZZZZ</td>
<td>
<span class="strong"><strong>+01:00</strong></span>
                        </td>
</tr>
<tr>
<td>T</td>
<td>Time zone, localized, abbreviated</td>
<td>Zend_Date::TIMEZONE</td>
<td>z or zz or zzz</td>
<td>
<span class="strong"><strong>CET</strong></span>
                        </td>
</tr>
<tr>
<td>Z</td>
<td>Time zone offset in seconds</td>
<td>Zend_Date::TIMEZONE_SECS</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>3600</strong></span>
                        </td>
</tr>
<tr>
<td>c</td>
<td>Standard Iso format output</td>
<td>Zend_Date::ISO_8601</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>2004-02-12T15:19:21+00:00</strong></span>
                        </td>
</tr>
<tr>
<td>r</td>
<td>Standard Rfc 2822 format output</td>
<td>Zend_Date::RFC_2822</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>Thu, 21 Dec 2000 16:01:07 +0200</strong></span>
                        </td>
</tr>
<tr>
<td>U</td>
<td>Unix timestamp</td>
<td>Zend_Date::TIMESTAMP</td>
<td>no equivalent</td>
<td>
<span class="strong"><strong>15275422364</strong></span>
                        </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
</div>
<div class="navfooter"><table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="zend.date.creation.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="zend.date.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="zend.date.additional.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">9.5. Creation of dates </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> 9.7. Working examples</td>
</tr>
</table></div>
<div class="revinfo"></div>
</body>
</html>
